<template>
	<view>
		<u-tabbar
			:value="value"
			@change="changeTabbar"
			:fixed="true"
			:placeholder="true"
			:safeAreaInsetBottom="true"
			:border="false"
			activeColor="#0084e1"
			inactiveColor="#AEB1C7"
			
		>
			<u-tabbar-item text="鱼票" >
				<u-icon name="/static/images/st-101.png" slot="inactive-icon" size="42rpx"></u-icon>
				<u-icon name="/static/images/st-102.png" slot="active-icon" size="42rpx"></u-icon>
			</u-tabbar-item>
			<u-tabbar-item text="饵料">
				<u-icon name="/static/images/st-201.png" slot="inactive-icon" size="40rpx"></u-icon>
				<u-icon name="/static/images/st-202.png" slot="active-icon" size="40rpx"></u-icon>
			</u-tabbar-item>
			<u-tabbar-item text="渔获">
				<u-icon name="/static/images/st-301.png" slot="inactive-icon" size="40rpx"></u-icon>
				<u-icon name="/static/images/st-302.png" slot="active-icon" size="40rpx"></u-icon>
			</u-tabbar-item>
			<u-tabbar-item text="排行榜">
				<u-icon name="/static/images/st-401.png" slot="inactive-icon" size="38rpx"></u-icon>
				<u-icon name="/static/images/st-402.png" slot="active-icon" size="38rpx"></u-icon>
			</u-tabbar-item>
			<u-tabbar-item text="鱼汛">
				<u-icon name="/static/images/st-501.png" slot="inactive-icon" size="44rpx"></u-icon>
				<u-icon name="/static/images/st-502.png" slot="active-icon" size="44rpx"></u-icon>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		name:"storeTabbar",
		props: {
			value: {
				type: Number,
				default:0 
			},
			storeId:{
				type: Number,
				default:0 
			}
		},
		data() {
			return {
				count:null
			};
		},
		methods:{
			changeTabbar(name){
				// this.value = name
				let storeId = this.storeId
				let params = '?storeID='+storeId
				switch (name){
					case 0:
						uni.redirectTo({
							url:'/pages/store/fishpond/index'+params
						})
						this.$emit('tabNav',)
						break;
					case 1:
						uni.redirectTo({
							url:'/pages/store/bait/index'+params
						})
						break;
					case 2:
						uni.redirectTo({
							url:'/pages/store/fishCatchPage/index'+params
						})
						break;
					case 3:
						uni.redirectTo({
							url:'/pages/store/leaderboards/index'+params
						})
						break;
					case 4:
						uni.redirectTo({
							url:'/pages/store/fisheryNews/index'+params
						})
						break;
					default:
						break;
				}
			}
		}
		
	}
</script>

<style>

</style>